package com.jzcn.common.enums;

import lombok.Getter;

public enum ResourcesTypeEnum {
    MENU("菜单", 0),

    CATE("类目", 1),

    BTN("按钮", 2);

    @Getter
    private String content;

    @Getter
    private Integer value;

    ResourcesTypeEnum(String content, Integer value) {
        this.content = content;
        this.value = value;
    }

    public static ResourcesTypeEnum getByValue(Integer value) {
        ResourcesTypeEnum[] types = ResourcesTypeEnum.values();
        for (ResourcesTypeEnum type : types) {
            if (type.getValue().equals(value)) {
                return type;
            }
        }
        return null;
    }
}
